package com.well.register.console.util;

import lombok.Data;

/**
 * <p>
 * Rpc Response Model
 * </p>
 *
 * @author weedo
 * @since 2022/7/30
 */
@Data
public class RpcPageResponse<T> extends RpcResponse<T> {

    private Long current;

    private Long pageSize;

    private Long total;

    public RpcPageResponse(T obj, Long current, Long pageSize, Long total) {
        super(obj);
        this.current = current;
        this.pageSize = pageSize;
        this.total = total;
    }

    public static RpcResponse<Object> ok(Object obj, Long current, Long pageSize, Long total) {
        return new RpcPageResponse<>(obj, current, pageSize, total);
    }

}
